<template>
  <div>
    <h1>B : {{ count }}</h1>
    <button @click="increase">点击加一</button>
    <button @click="increaseN(5)">点击加N(自己传参)</button>
    <button @click="increaseNWait(10)">点击一秒后加N(自己传参)</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "B",
});
</script>

<script setup lang="ts">
import { storeToRefs } from "pinia";
import useCountStore from "../store/modules/count";
const countStore = useCountStore();
const { increase, increaseN, increaseNWait } = countStore;
const { count } = storeToRefs(countStore);
</script>

<style  scoped >
</style>